﻿@using Apps.Common;
@using Apps.Models.Sys;
@using Apps.Web.Core;

@model Apps.Models.Sys.SysUserModel

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";

    List<PermModel> perm = ViewBag.perm;
    if (perm == null) {
        perm = new List<PermModel>();
    }
}

<script type="text/javascript">
    $(function () {
        $('#btnSave').click(function () {
            $.ajax({
                url: '@Url.Action("Create")',
                type: 'post',
                data: $('#CreateForm').serialize(),
                dataType: 'json',
                success: function (data) {
                    if (data.tag == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(true);
                        window.parent.frameReturnByClose()
                    } else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        });
        $("#btnReturn").click(function () {
            window.parent.frameReturnByClose();
        });

    });

</script>


<div class="mvctool bgb">
    @Html.ToolButton("btnSave", "icon-save", "保存",  true, perm, "Save")
    @Html.ToolButton("btnReturn", "icon-return", "返回", false)
</div>

@using (Html.BeginForm("Create","SysUser",null,FormMethod.Post,new { id="CreateForm"}))
{
            <table class="fromEditTable setTextWidth300">
                <tbody>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Id)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Id)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.UserName)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.UserName)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Password)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Password)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.TrueName)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.TrueName)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Card)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Card)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.MobileNumber)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.MobileNumber)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.PhoneNumber)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.PhoneNumber)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.QQ)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.QQ)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.EmailAddress)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.EmailAddress)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.OtherContact)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.OtherContact)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Province)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Province)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.City)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.City)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Village)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Village)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Address)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Address)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.State)：
                        </td>
                        <td style="width:310px">
                            @Html.CheckBoxFor(model => model._state, new { @checked = true })
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Sex)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Sex)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Marital)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Marital)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Political)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Political)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Nationality)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Nationality)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Native)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Native)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.School)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.School)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Professional)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Professional)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Degree)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Degree)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.DepId)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.DepId)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.PosId)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.PosId)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Expertise)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Expertise)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.JobState)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.JobState)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Photo)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Photo)
                        </td>
                    </tr>
                    <tr>
                        <td style="width:100px; text-align:right;">
                            @Html.LabelFor(model => model.Attach)：
                        </td>
                        <td style="width:310px">
                            @Html.EditorFor(model => model.Attach)
                        </td>
                    </tr>
                </tbody>
            </table>
}

